Analysis and Optimization of Javascript Engines

نویسندگان

  • Gem Dot
  • Alejandro Martínez
  • Antonio González
چکیده

JavaScript is an interpreted computer programming language embedded into web pages that allows the creation of sophisticated solutions in the client-side web. It consists of a core programming language together with a host environment, namely, the Document Object Model (DOM) provided by the web browser. JavaScript has to be interpreted and executed by a dynamic translator inside the web browser, unlike desktop applications, which execute optimized code for a specific operating system. This dynamic translator is commonly called the JavaScript engine. Google uses V8 in Google Chrome and Node.js, Apple uses Nitro in Safari, Mozilla uses Rhino in Firefox and Microsoft uses JScript engine in Internet Explorer. Important efforts to improve the performance of these engines have been done in the last years. In this work, we focus on V8 JavaScript engine, which is an open source and widely used JavaScript engine developed by Google that ships with Chrome web browser. V8 is a dynamic compiler and therefore, program execution and code generation have to be efficiently synchronized in order not to affect responsiveness. It focuses on optimizing hot functions (i.e. those that execute more often). In this regard, V8 integrates two compilers, one that runs fast (i.e. has light overhead) and produces generic code (Full-codegen); and one that does not run as fast but generates more optimized code (Crankshaft). There is a significant number of executed instructions that are not part of the JavaScript application itself. These instructions can be considered as overhead produced by the V8 engine, which is a consequence of the characteristics of the JavaScript language along with the dynamic compilation nature of V8. This work deals with V8 targeting x86-64 processors. We have quantified two kinds of overhead in the JavaScript execution in steady state. The first one is the V8 runtime overhead needed to support native execution (i.e. garbage collector, compilation, etc.). The second one is the additional checks and guards introduced by the dynamic nature of JavaScript. These two types of overhead represent 35% and 25% respectively of the total execution time in average There is a great opportunity to improve the performance of JavaScript platforms by reducing these overheads. Therefore, we propose using the insights gained from this study to improve certain parts of V8, concretely the overhead due to the dynamic nature of JavaScript. The optimizations that we propose are based on hw/sw codesigned techniques that incorporate new x86-64 instructions tailored for dynamic languages. 2. PROPOSAL

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

EMME: a formal tool for ECMAScript Memory Model Evaluation

Nearly all web-based interfaces are written in JavaScript. Given its prevalence, the support for high performance JavaScript code is crucial. The ECMA Technical Committee 39 (TC39) has recently extended the ECMAScript language (i.e., JavaScript) to support shared memory accesses between different threads. The extension is given in terms of a natural language memory model specification. In this ...

متن کامل

Search Integration with WebSphere Portal: The Options and Challenges

Modern web applications and servers like Portal require adequate support for integration of search services due to user focused information delivery and user interaction, as well as new technologies used to render such information, which is exemplified by two fundamental problems that have long plagued web crawlers: dynamic content and Javascript generated content. Today, the solution is simple...

متن کامل

AERO-THERMODYNAMIC OPTIMIZATION OF TURBOPROP ENGINES USING MULTI-OBJECTIVE GENETIC ALGORITHMS

In this paper multi-objective genetic algorithms were employed for Pareto approach optimization of turboprop engines. The considered objective functions are used to maximize the specific thrust, propulsive efficiency, thermal efficiency, propeller efficiency and minimize the thrust specific fuel consumption. These objectives are usually conflicting with each other. The design variables consist ...

متن کامل

Initial Steps for the Coupling of JavaScript Physics Engines with X3DOM

During the past years, first physics engines based on JavaScript have been developed for web applications. These are capable of displaying virtual scenes much more realistically. Thus, new application areas can be opened up, particularly with regard to the coupling of X3DOM-based 3D models. The advantage is that web-based applications are easily accessible to all users. Furthermore, such engine...

متن کامل

Addressing JavaScript JIT Engines Performance Quirks: A Crowdsourced Adaptive Compiler

JavaScript has long outpaced its original target applications, being used not only for coding complex web clients, but also web servers, game development and even desktop applications. The most appealing advantage of moving applications to JavaScript is its capability to run the same code in a large number of different devices. It is not surprising that many compilers target JavaScript as an in...

متن کامل

Optimization of waste gate in the diesel engines with turbocharger

The usage of turbochargers in diesel engines has led to the downsizing of the motors as well as usage of the waste gates in turbochargers. Any dimensional reduction in turbochargers and appurtenant leads to an enhancement on the performance of internal combustion engines and in environmental problems in terms of aerodynamic, thermodynamic and mechanical specifications for both engines and turbo...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015